package com.student.grade.service;

import com.student.common.entity.Grade;
import com.student.grade.dto.GradeDTO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

/**
 * 成绩服务接口
 * 
 * @author student
 * @date 2025
 */
public interface GradeService {
    
    /**
     * 录入成绩
     */
    boolean inputGrade(Grade grade);
    
    /**
     * 修改成绩
     */
    boolean updateGrade(Grade grade);
    
    /**
     * 查询学生成绩
     */
    Page<Grade> getStudentGrades(String studentId, String semester, Pageable pageable);
    
    /**
     * 查询课程成绩
     */
    Page<Grade> getCourseGrades(String courseId, String semester, Pageable pageable);
    
    /**
     * 成绩统计
     */
    Object getGradeStatistics(String semester);
    
    /**
     * 成绩列表查询
     */
    Page<Grade> getGradeList(Pageable pageable, String studentId, String courseId, String semester, String gradeType);
    
    /**
     * 成绩列表查询（带关联信息）
     */
    Page<GradeDTO> getGradeListWithDetails(Pageable pageable, String studentId, String courseId, String semester, String gradeType);
    
    /**
     * 根据ID查询成绩
     */
    Grade getGradeById(Long gradeId);
}
